package com.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.domain.Answer;
import com.example.domain.Question;

import java.util.List;
import java.util.Map;

/**
* @author DPH
* @description 针对表【tbl_answer】的数据库操作Service
* @createDate 2022-11-23 16:19:41
*/
public interface AnswerService extends IService<Answer> {
    /**
     * 保存答案
     * @param answer
     * @return
     */
    boolean saveAnswer(Answer answer);

    /**
     * 修改答案
     * @param answer
     * @return
     */
    boolean modify(Answer answer);

    Map<Integer,Map<String,Integer>> getAnswer(List<Question> questions);

    Map<Integer,List<String>> getClozeAnswer(List<Question> questions);

    boolean delete(Integer questionId);
}
